#include "car.h"
#include "UP_Globle.h"

 void car_control(u8 car_act)  //����
{
	switch (car_act)
	{
		case brake:
			motor_control(0,0,0,0);  
		break;
		
		case low_reteat:
			motor_control(500,500,-500,-500);
		break;
		
		case high_reteat:
			motor_control(1000,1000,-1000,-1000);
		break;
		
		case low_advance:
			motor_control(-500,-500,500,500);
		break;
		
		case middle_advance:
			motor_control(-800,-800,800,800);
		break;
		
		case high_advance:
			motor_control(-1000,-1000,1000,1000);
		break;
			
		case turn_left:
			motor_control(1000,1000,1000,1000);	 
		break;
		
		case turn_right:
			motor_control(-1000,-1000,-1000,-1000);	 
		break;
			
		case Round_left:
			motor_control(700,700,700,700);
		break;
		
		case Round_right:
			motor_control(-700,-700,-800,-800);
		break;
		
		default:
		break;
			
	}
}
